package com.osgix.authorize.dao.impl;

import org.springframework.stereotype.Repository;

import com.osgix.authorize.dao.UserRoleDao;
import com.osgix.authorize.model.UserRole;
import com.osgix.common.orm.ibatis.BaseIbatisDao;

@Repository("userRoleDao")
public class UserRoleDaoImpl extends BaseIbatisDao<UserRole, Long> implements UserRoleDao {

	@Override
	public String getIbatisMapperNamesapce() {
		return "UserRole";
	}

	public void saveOrUpdate(UserRole userRole) {
		if (userRole.getUserRoleId() == null)
			save(userRole);
		else
			update(userRole);
	}

}
